<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="div1">第一个div</div>
		<div class="baseDIV">第二个div</div>
		<div>第三个div</div>
		<button type="button" onclick="getDiv();">获取div</button>
		<br><br>
		
		<h1 id="h1_id" class="h1_class">标题</h1>
		<button type="button" onclick="getH1();">获取标题</button><br><br>
		
		<p id="p_id">第一个标签</p>
		<p class="p_class">第二个标签</p>
		<p>第三个标签</p>
		<p>第四个标签</p>
		<p>第五个标签</p>
		<button type="button" onclick="getP();">获取标签</button><br><br>
		
		<img id="img_id" class="img_class" src="../../img/bf3376333c1e4700beeeca72e9aaff66.jpg" style="width: 100px;height: 100px;" >
		<br><br>
		<button type="button" onclick="getImg();">获取图片</button><br><br>
		
		<ul>
			<li id="li_id">列表</li>
			<li class="li_class">列表2</li>
		</ul>
		<button type="button" onclick="getLi();">获取列表</button>
		
		
	</body>
	<script type="text/javascript">
	    //元素查找
		function getDiv(){
			var divObj1=document.getElementById('div1');
			console.log(divObj1);
			var divObj2=document.getElementsByClassName('baseDIV');
			console.log(divObj2);
			var divObj3=document.getElementsByTagName('div');
			console.log(divObj3);
		}
		function getH1(){
			var h1Obj1=document.getElementById('h1_id');
			console.log(h1Obj1);
			var h1Obj2=document.getElementsByClassName('h1_class');
			console.log(h1Obj2);
			var h1Obj3=document.getElementsByTagName('h1');
			console.log(h1Obj3);
		}
		function getP(){
			var pObj1=document.getElementById('p_id');
			console.log(pObj1);
			var pObj2=document.getElementsByClassName('p_class');
			console.log(pObj2);
			var pObj3=document.getElementsByTagName('p');
			console.log(pObj3);
		}
		function getImg(){
			var imgObj1=document.getElementById('img_id');
			console.log(imgObj1);
			var imgObj2=document.getElementsByClassName('img_class');
			console.log(imgObj2);
			var imgObj3=document.getElementsByTagName('img');
			console.log(imgObj3);
		}
		function getLi(){
			var liObj1=document.getElementById('li_id');
			console.log(liObj1);
			var liObj2=document.getElementsByClassName('li_class');
			console.log(liObj2);
			var liObj3=document.getElementsByTagName('li');
			console.log(liObj3);
		}
		
		
		
	</script>
	
</html>
<!-- 2.新制作一个页面，要求：
       2.1 至少包含以下元素：3个DIV,标题，5个P标签，图片，列表 
       2.2 分别实现 id,类，标签三种方式查找以上元素 -->